<?php
/**
 * sales order block
 */
function get_sales_order_block(){
	$s = "<div id=\"sales-order-block\">";
	$s .= "\n\t<div id=\"sales-order-detail\">";
	$s .= "\n\t\t<label>S.O. #<input id=\"sales-order-id\" type=\"text\"/></label>";
	$s .= "\n\t\t<label>Date <input id=\"sales-order-date\" class=\"date\" type=\"text\"/></label>";
	$s .= "\n\t\t<label>Customer<em>*</em><input id=\"sales-order-customer\" class=\"autocomplete\" type=\"text\"/></label>";
	$s .= "\n\t\t<label>Address<em>*</em><textarea id=\"sales-order-customer-address\"></textarea></label>";
	$s .= "\n\t\t<label>Specific instructions<textarea id=\"sales-order-instructions\"></textarea></label>";
	$s .= "\n\t\t\t<table>";
	$s .= "\n\t\t\t\t<thead>";
	$s .= "\n\t\t\t\t\t<tr>";
	$s .= "\n\t\t\t\t\t\t<th title=\"Sales representative\">Rep</th>";
	$s .= "\n\t\t\t\t\t\t<th title=\"Job\">Job</th>";
	$s .= "\n\t\t\t\t\t\t<th title=\"Shipping method\">Shipping</th>";
	$s .= "\n\t\t\t\t\t\t<th title=\"Shipping terms\">Shipping Terms</th>";
	$s .= "\n\t\t\t\t\t\t<th title=\"Delivery date\">Delivery Date</th>";
	$s .= "\n\t\t\t\t\t\t<th title=\"Payment Terms\">Payment Terms</th>";
	$s .= "\n\t\t\t\t\t\t<th title=\"Location\">Location</th>";
	$s .= "\n\t\t\t\t\t</tr>";
	$s .= "\n\t\t\t\t</thead>";
	$s .= "\n\t\t\t\t<tbody>";
	$s .= "\n\t\t\t\t\t<tr>";
	$s .= "\n\t\t\t\t\t\t<td><input id=\"sales-order-rep\" class=\"autocomplete\" type=\"text\"/></td>";
	$s .= "\n\t\t\t\t\t\t<td><input id=\"sales-order-job\" class=\"autocomplete\" type=\"text\"/></td>";
	$s .= "\n\t\t\t\t\t\t<td><input id=\"sales-order-ship-method\" type=\"text\"/></td>";
	$s .= "\n\t\t\t\t\t\t<td><input id=\"sales-order-ship-term\" type=\"text\"/></td>";
	$s .= "\n\t\t\t\t\t\t<td><input id=\"sales-order-delivery-date\" class=\"date\" type=\"text\"/></td>";
	$s .= "\n\t\t\t\t\t\t<td><input id=\"sales-order-payment-term\" type=\"text\"/></td>";
	$s .= "\n\t\t\t\t\t\t<td><input id=\"sales-order-location\" type=\"text\"/></td>";
	$s .= "\n\t\t\t\t\t</tr>";
	$s .= "\n\t\t\t\t</tbody>";
	$s .= "\n\t\t\t</table>";
	$s .= "\n\t\t\t<div id=\"sales-order-items\">";
	$s .= "\n\t\t\t\t<table>";
	$s .= "\n\t\t\t\t\t<thead>";
	$s .= "\n\t\t\t\t\t\t<tr>";
	$s .= "\n\t\t\t\t\t\t\t<th title=\"Item code\">Code</th>";
	$s .= "\n\t\t\t\t\t\t\t<th title=\"Quantity\">Qty</th>";
	$s .= "\n\t\t\t\t\t\t\t<th title=\"Description\">Description</th>";
	$s .= "\n\t\t\t\t\t\t\t<th title=\"Unit price\">Unit Price</th>";
	$s .= "\n\t\t\t\t\t\t\t<th title=\"Line total\">Line Total</th>";
	$s .= "\n\t\t\t\t\t\t</tr>";
	$s .= "\n\t\t\t\t\t</thead>";
	$s .= "\n\t\t\t\t\t<tfoot>";
	$s .= "\n\t\t\t\t\t\t<tr>";
	$s .= "\n\t\t\t\t\t\t\t<td colspan=\"3\">Withholding Taxes</td>";
	$s .= "\n\t\t\t\t\t\t\t<td>Subtotal</td>";
	$s .= "\n\t\t\t\t\t\t\t<td><input type=\"text\"/></td>";
	$s .= "\n\t\t\t\t\t\t</tr>";
	$s .= "\n\t\t\t\t\t\t<tr>";
	$s .= "\n\t\t\t\t\t\t\t<td colspan=\"4\">VAT 12%</td>";
	$s .= "\n\t\t\t\t\t\t\t<td><input type=\"text\"/></td>";
	$s .= "\n\t\t\t\t\t\t</tr>";
	$s .= "\n\t\t\t\t\t\t<tr>";
	$s .= "\n\t\t\t\t\t\t\t<td colspan=\"4\">Total</td>";
	$s .= "\n\t\t\t\t\t\t\t<td><input type=\"text\"/></td>";
	$s .= "\n\t\t\t\t\t\t</tr>";
	$s .= "\n\t\t\t\t\t</tfoot>";
	$s .= "\n\t\t\t\t\t<tbody>";
	$s .= "\n\t\t\t\t\t\t<tr>";
	$s .= "\n\t\t\t\t\t\t\t<td><input type=\"text\"/></td>";
	$s .= "\n\t\t\t\t\t\t\t<td><input type=\"text\"/></td>";
	$s .= "\n\t\t\t\t\t\t\t<td><input type=\"text\"/></td>";
	$s .= "\n\t\t\t\t\t\t\t<td><input type=\"text\"/></td>";
	$s .= "\n\t\t\t\t\t\t\t<td><input type=\"text\"/></td>";
	$s .= "\n\t\t\t\t\t\t</tr>";
	$s .= "\n\t\t\t\t\t</tbody>";
	$s .= "\n\t\t\t\t</table>";
	$s .= "\n\t\t\t</div>";
	$s .= "\n\t</div>";
	$s .= "\n</div>";
	return $s;
}

/**
 * sales cash block
 */
function get_sales_cash_block(){
	$s = "<div id=\"sales-cash-block\">";
	$s .= "\n\t<div id=\"sales-cash-detail\">";
	$s .= "\n\t\t<label>Ref. #<input id=\"sales-cash-id\" type=\"text\"/></label>";
	$s .= "\n\t\t<label>Date<em>*</em><input id=\"sales-cash-date\" class=\"date\" type=\"text\"/></label>";
	$s .= "\n\t\t<label>Customer<em>*</em><input id=\"sales-cash-customer\" class=\"autocomplete\" type=\"text\"/></label>";
	$s .= "\n\t\t<label>Memo<em>*</em><textarea id=\"sales-cash-memo\"></textarea></label>";
	$s .= "\n\t\t<label>Amount<input id=\"sales-cash-amount\" type=\"text\"/></label>";
	$s .= "\n\t</div>";
	$s .= "\n\t<div id=\"sales-cash-orders\">";
	$s .= "\n\t\t<div id=\"sales-cash-orders-items\">";
	$s .= "\n\t\t</div>";
	$s .= "\n\t\t<a href=\"#\" title=\"Add sales order\">Add sales order</a>";
	$s .= "\n\t</div>";
	$s .= "\n</div>";
	return $s;
}

function get_sales_acct_block(){
	$s = "<div id=\"sales-acct-block\">";
	$s .= "\n\t<div id=\"sales-acct-detail\">";
	$s .= "\n\t\t<label>Receivable Account<em>*</em><input type=\"text\"/></label>";
	$s .= "\n\t\t<label>Ref #<input type=\"text\"/></label>";
	$s .= "\n\t\t<label>Date<input class=\"date\" type=\"text\"/></label>";
	$s .= "\n\t\t<label>Customer<em>*</em><input class=\"autocomplete\" type=\"text\"/></label>";
	$s .= "\n\t\t<label>Memo<em>*</em><input type=\"text\"/></label>";
	$s .= "\n\t\t<label>Amount<input type=\"text\"/></label>";
	$s .= "\n\t</div>";
	$s .= "\n\t<div id=\"sales-orders\">";
	$s .= "\n\t</div>";
	$s .= "\n</div>";
	return $s;
}

function get_credit_memo_block(){
	$s = "<div id=\"credit-memo\">";
	$s .= "\n\t<div id=\"credit-memo-details\">";
	$s .= "\n\t\t<label>Account<input class=\"autocomplete\" type=\"text\"/></label>";
	$s .= "\n\t\t<label>Ref #<input type=\"text\"/></label>";
	$s .= "\n\t\t<label>Date<input class=\"date\" type=\"text\"/></label>";
	$s .= "\n\t\t<label>Customer<em>*<em><input class=\"autocomplete\" type=\"text\"/></label>";
	$s .= "\n\t\t<label>Memo<input type=\"text\"/></label>";
	$s .= "\n\t\t<label>Amount<input type=\"text\"/></label>";
	$s .= "\n\t</div>";	
	$s .= "\n\t<div id=\"sales-orders\">";
	$s .= "\n\t</div>";
	$s .= "\n</div>";
	return $s;
}